using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._MosaicDataset
{
    /// <summary>
    /// <para>Generate Exclude Area</para>
    /// <para>Masks pixels based on their color or by clipping a range of values. The output of this tool is used as an input to the Color Balance Mosaic Dataset tool to eliminate areas such as clouds and water that can skew the statistics used to color balance multiple images.</para>
    /// <para>根据像素的颜色或剪裁一系列值来遮罩像素。此工具的输出用作色彩平衡镶嵌数据集工具的输入，以消除云和水等区域，这些区域可能会扭曲用于对多个图像进行颜色平衡的统计数据。</para>
    /// </summary>    
    [DisplayName("Generate Exclude Area")]
    public class GenerateExcludeArea : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateExcludeArea()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input Raster</para>
        /// <para>The raster or mosaic dataset layer that you want to mask.</para>
        /// <para>要遮罩的栅格或镶嵌数据集图层。</para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output Raster Dataset</para>
        /// <para>The name, location and format for the dataset you are creating. When storing a raster dataset in a geodatabase, do not add a file extension to the name of the raster dataset. When storing your raster dataset to a JPEG file, a JPEG 2000 file, or a geodatabase, you can specify a Compression type and Compression Quality within the Environment Settings.</para>
        /// <para>要创建的数据集的名称、位置和格式。在地理数据库中存储栅格数据集时，请勿在栅格数据集的名称中添加文件扩展名。将栅格数据集存储到 JPEG 文件、JPEG 2000 文件或地理数据库时，可以在环境设置中指定压缩类型和压缩质量。</para>
        /// </param>
        /// <param name="_pixel_type">
        /// <para>Pixel Type</para>
        /// <para><xdoc>
        ///   <para>Choose the pixel depth of your input raster dataset. 8-bit is the default value; however, raster datasets with a greater bit-depth will need to have the color mask and histogram values scaled accordingly.</para>
        ///   <bulletList>
        ///     <bullet_item>8 bit—The input raster dataset has values from 0 to 255. This is the default.</bullet_item><para/>
        ///     <bullet_item>11 bit—The input raster dataset has values from 0 to 2047.</bullet_item><para/>
        ///     <bullet_item>12 bit—The input raster dataset has values from 0 to 4095.</bullet_item><para/>
        ///     <bullet_item>16 bit—The input raster dataset has values from 0 to 65535.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>选择输入栅格数据集的像素深度。8 位是默认值;但是，具有更大位深度的栅格数据集将需要相应地缩放颜色掩码和直方图值。</para>
        ///   <bulletList>
        ///     <bullet_item>8 位 - 输入栅格数据集的值介于 0 到 255 之间。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>11 位 - 输入栅格数据集的值介于 0 到 2047 之间。</bullet_item><para/>
        ///     <bullet_item>12 位 - 输入栅格数据集的值介于 0 到 4095 之间。</bullet_item><para/>
        ///     <bullet_item>16 位 - 输入栅格数据集的值介于 0 到 65535 之间。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_generate_method">
        /// <para>Generate Method</para>
        /// <para><xdoc>
        ///   <para>Create your mask based on the color of the pixels or by clipping high and low values.</para>
        ///   <bulletList>
        ///     <bullet_item>Color mask—Set the maximum color values to include in the output. This is the default.</bullet_item><para/>
        ///     <bullet_item>Histogram percentage—Remove a percentage of high and low pixel values.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>根据像素的颜色或通过裁剪高值和低值来创建蒙版。</para>
        ///   <bulletList>
        ///     <bullet_item>颜色遮罩 - 设置要包含在输出中的最大颜色值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>直方图百分比 - 移除高像素值和低像素值的百分比。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public GenerateExcludeArea(object _in_raster, object _out_raster, _pixel_type_value? _pixel_type, _generate_method_value _generate_method)
        {
            this._in_raster = _in_raster;
            this._out_raster = _out_raster;
            this._pixel_type = _pixel_type;
            this._generate_method = _generate_method;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Generate Exclude Area";

        public override string CallName => "management.GenerateExcludeArea";

        public override List<string> AcceptEnvironments => ["extent", "geographicTransformations", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _out_raster, _pixel_type.GetGPValue(), _generate_method.GetGPValue(), _max_red, _max_green, _max_blue, _max_white, _max_black, _max_magenta, _max_cyan, _max_yellow, _percentage_low, _percentage_high];

        /// <summary>
        /// <para>Input Raster</para>
        /// <para>The raster or mosaic dataset layer that you want to mask.</para>
        /// <para>要遮罩的栅格或镶嵌数据集图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Output Raster Dataset</para>
        /// <para>The name, location and format for the dataset you are creating. When storing a raster dataset in a geodatabase, do not add a file extension to the name of the raster dataset. When storing your raster dataset to a JPEG file, a JPEG 2000 file, or a geodatabase, you can specify a Compression type and Compression Quality within the Environment Settings.</para>
        /// <para>要创建的数据集的名称、位置和格式。在地理数据库中存储栅格数据集时，请勿在栅格数据集的名称中添加文件扩展名。将栅格数据集存储到 JPEG 文件、JPEG 2000 文件或地理数据库时，可以在环境设置中指定压缩类型和压缩质量。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Pixel Type</para>
        /// <para><xdoc>
        ///   <para>Choose the pixel depth of your input raster dataset. 8-bit is the default value; however, raster datasets with a greater bit-depth will need to have the color mask and histogram values scaled accordingly.</para>
        ///   <bulletList>
        ///     <bullet_item>8 bit—The input raster dataset has values from 0 to 255. This is the default.</bullet_item><para/>
        ///     <bullet_item>11 bit—The input raster dataset has values from 0 to 2047.</bullet_item><para/>
        ///     <bullet_item>12 bit—The input raster dataset has values from 0 to 4095.</bullet_item><para/>
        ///     <bullet_item>16 bit—The input raster dataset has values from 0 to 65535.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>选择输入栅格数据集的像素深度。8 位是默认值;但是，具有更大位深度的栅格数据集将需要相应地缩放颜色掩码和直方图值。</para>
        ///   <bulletList>
        ///     <bullet_item>8 位 - 输入栅格数据集的值介于 0 到 255 之间。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>11 位 - 输入栅格数据集的值介于 0 到 2047 之间。</bullet_item><para/>
        ///     <bullet_item>12 位 - 输入栅格数据集的值介于 0 到 4095 之间。</bullet_item><para/>
        ///     <bullet_item>16 位 - 输入栅格数据集的值介于 0 到 65535 之间。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pixel Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _pixel_type_value? _pixel_type { get; set; }

        public enum _pixel_type_value
        {
            /// <summary>
            /// <para>8 bit</para>
            /// <para>8 bit—The input raster dataset has values from 0 to 255. This is the default.</para>
            /// <para>8 位 - 输入栅格数据集的值介于 0 到 255 之间。这是默认设置。</para>
            /// </summary>
            [Description("8 bit")]
            [GPEnumValue("8_BIT")]
            _8_BIT,

            /// <summary>
            /// <para>11 bit</para>
            /// <para>11 bit—The input raster dataset has values from 0 to 2047.</para>
            /// <para>11 位 - 输入栅格数据集的值介于 0 到 2047 之间。</para>
            /// </summary>
            [Description("11 bit")]
            [GPEnumValue("11_BIT")]
            _11_BIT,

            /// <summary>
            /// <para>12 bit</para>
            /// <para>12 bit—The input raster dataset has values from 0 to 4095.</para>
            /// <para>12 位 - 输入栅格数据集的值介于 0 到 4095 之间。</para>
            /// </summary>
            [Description("12 bit")]
            [GPEnumValue("12_BIT")]
            _12_BIT,

            /// <summary>
            /// <para>16 bit</para>
            /// <para>16 bit—The input raster dataset has values from 0 to 65535.</para>
            /// <para>16 位 - 输入栅格数据集的值介于 0 到 65535 之间。</para>
            /// </summary>
            [Description("16 bit")]
            [GPEnumValue("16_BIT")]
            _16_BIT,

        }

        /// <summary>
        /// <para>Generate Method</para>
        /// <para><xdoc>
        ///   <para>Create your mask based on the color of the pixels or by clipping high and low values.</para>
        ///   <bulletList>
        ///     <bullet_item>Color mask—Set the maximum color values to include in the output. This is the default.</bullet_item><para/>
        ///     <bullet_item>Histogram percentage—Remove a percentage of high and low pixel values.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>根据像素的颜色或通过裁剪高值和低值来创建蒙版。</para>
        ///   <bulletList>
        ///     <bullet_item>颜色遮罩 - 设置要包含在输出中的最大颜色值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>直方图百分比 - 移除高像素值和低像素值的百分比。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Generate Method")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _generate_method_value _generate_method { get; set; }

        public enum _generate_method_value
        {
            /// <summary>
            /// <para>Color mask</para>
            /// <para>Color mask—Set the maximum color values to include in the output. This is the default.</para>
            /// <para>颜色遮罩 - 设置要包含在输出中的最大颜色值。这是默认设置。</para>
            /// </summary>
            [Description("Color mask")]
            [GPEnumValue("COLOR_MASK")]
            _COLOR_MASK,

            /// <summary>
            /// <para>Histogram percentage</para>
            /// <para>Histogram percentage—Remove a percentage of high and low pixel values.</para>
            /// <para>直方图百分比 - 移除高像素值和低像素值的百分比。</para>
            /// </summary>
            [Description("Histogram percentage")]
            [GPEnumValue("HISTOGRAM_PERCENTAGE")]
            _HISTOGRAM_PERCENTAGE,

        }

        /// <summary>
        /// <para>Maximum Red</para>
        /// <para>The maximum red value to exclude. The default is 255.</para>
        /// <para>要排除的最大红色值。默认值为 255。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Red")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _max_red { get; set; } = 255;


        /// <summary>
        /// <para>Maximum Green</para>
        /// <para>The maximum green value to exclude. The default is 255.</para>
        /// <para>要排除的最大绿色值。默认值为 255。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Green")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _max_green { get; set; } = 255;


        /// <summary>
        /// <para>Maximum Blue</para>
        /// <para>The maximum blue value to exclude. The default is 255.</para>
        /// <para>要排除的最大蓝色值。默认值为 255。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Blue")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _max_blue { get; set; } = 255;


        /// <summary>
        /// <para>Maximum White</para>
        /// <para>The maximum white value to exclude. The default is 255.</para>
        /// <para>要排除的最大白色值。默认值为 255。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum White")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _max_white { get; set; } = 255;


        /// <summary>
        /// <para>Maximum Black</para>
        /// <para>The maximum black value to exclude. The default is 0.</para>
        /// <para>要排除的最大黑色值。默认值为 0。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Black")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _max_black { get; set; } = 0;


        /// <summary>
        /// <para>Maximum Magenta</para>
        /// <para>The maximum magenta value to exclude. The default is 255.</para>
        /// <para>要排除的最大洋红色值。默认值为 255。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Magenta")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _max_magenta { get; set; } = 255;


        /// <summary>
        /// <para>Maximum Cyan</para>
        /// <para>The maximum cyan value to exclude. The default is 255.</para>
        /// <para>要排除的最大青色值。默认值为 255。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Cyan")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _max_cyan { get; set; } = 255;


        /// <summary>
        /// <para>Maximum Yellow</para>
        /// <para>The maximum yellow value to exclude. The default is 255.</para>
        /// <para>要排除的最大黄色值。默认值为 255。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Yellow")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _max_yellow { get; set; } = 255;


        /// <summary>
        /// <para>Low Percentage</para>
        /// <para>Exclude this percentage of the lowest pixel values. The default is 0.</para>
        /// <para>排除此百分比的最低像素值。默认值为 0。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Low Percentage")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _percentage_low { get; set; } = 0;


        /// <summary>
        /// <para>High Percentage</para>
        /// <para>Exclude this percentage of the highest pixel values. The default is 100.</para>
        /// <para>排除此百分比的最高像素值。默认值为 100。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("High Percentage")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _percentage_high { get; set; } = 100;


        public GenerateExcludeArea SetEnv(object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, object workspace = null)
        {
            base.SetEnv(extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, workspace: workspace);
            return this;
        }

    }

}